﻿using System;
using System.Windows.Forms;

namespace ProjectN.Core
{
    public partial class AboutBox : Form
    {
        public AboutBox()
        {
            InitializeComponent();
            this.Text = String.Format("关于 {0}", AssemblyTitle);
            this.labelProductName.Text = AssemblyProduct;
            this.labelVersion.Text = String.Format("版本 {0}", AssemblyVersion);
            this.labelCopyright.Text = AssemblyCopyright;
            this.labelCompanyName.Text = AssemblyCompany;
            this.textBoxDescription.Text = AssemblyDescription;
        }

        #region 程序集特性访问器

        public string AssemblyTitle
        {
            get
            {
                return ProjectN.Properties.Resources.A_NAME_S;
            }
        }

        public string AssemblyVersion
        {
            get
            {
                return ProjectN.Properties.Resources.A_VERSION;
            }
        }

        public string AssemblyDescription
        {
            get
            {
                return ProjectN.Properties.Resources.A_DESC;
            }
        }

        public string AssemblyProduct
        {
            get
            {
                return ProjectN.Properties.Resources.A_NAME;
            }
        }

        public string AssemblyCopyright
        {
            get
            {
                return ProjectN.Properties.Resources.A_COPYRIGHT;
            }
        }

        public string AssemblyCompany
        {
            get
            {
                return "";
            }
        }
        #endregion

        private void okButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
